package net.pm.core.entities.db;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import net.pm.core.entities.PMCommandEntity;


/**
 * The persistent class for the dept_power database table.
 * 
 */
@Entity
@Table(name="dept_power")
public class DeptPower extends PMCommandEntity<DeptPower>  {
	/**
	 * 
	 */
	private static final long serialVersionUID = 3089532455885937570L;
	private Long id;
	private Pmdept pmdept;
	private Pmpower pmpower;

    public DeptPower() {
    }


    @Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(unique=true, nullable=false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}


	//bi-directional many-to-one association to Pmdept
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="DeptId")
	public Pmdept getPmdept() {
		return this.pmdept;
	}

	public void setPmdept(Pmdept pmdept) {
		this.pmdept = pmdept;
	}
	

	//bi-directional many-to-one association to Pmpower
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="PowerId")
	public Pmpower getPmpower() {
		return this.pmpower;
	}

	public void setPmpower(Pmpower pmpower) {
		this.pmpower = pmpower;
	}


	@Override
	public int compareTo(DeptPower o) {
		// TODO Auto-generated method stub
		return 0;
	}
	
}